package com.lib.dto.enums;

/**
 * Created by duqingxiang on 17/5/22.
 */
public enum CustomerMenuEnum {

    APPLY_TEXT("APPLYING", "wxMessage/customer/customer_welcome.ftl"),
    APPLY_SCAN_TEXT("APPLYING_SCAN", "wxMessage/customer/customer_apply.ftl");

    private String key;

    private String template;

    CustomerMenuEnum(String key, String template) {
        this.key = key;
        this.template = template;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getTemplate() {
        return template;
    }

    public void setTemplate(String template) {
        this.template = template;
    }

    public static CustomerMenuEnum valuesOf(String key){
        for (CustomerMenuEnum text : values()) {
            if (text.getKey().equals(key)) {
                return text;
            }
        }
        return null;
    }

}
